home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1998 January / PC Answers Issue 49 Cover CD January 1998.iso / Apps / Director / DATA.Z / Ink Effects.dir / Scripts_13_Cross Scene Scrolling Handlers.ls < prev    next >
Encoding:
Text File  |  1997-05-10  |  1.9 KB  |  62 lines

  1. on scrollInkEffectsUp
  2.   global gCurrentInkPosition, gCurrentInk
  3.   doButton()
  4.   if the result = 1 then
  5.     if gCurrentInkPosition < 2 then
  6.       nothing()
  7.     else
  8.       repeat with N = 1 to 4
  9.         set the memberNum of sprite (16 + N) to the memberNum of sprite (16 + N) - 1
  10.       end repeat
  11.       set gCurrentInkPosition to gCurrentInkPosition - 1
  12.       if the visible of sprite 21 = 1 then
  13.         if the locV of sprite 21 = 93 then
  14.           set the visible of sprite 21 to 0
  15.         else
  16.           set oldLocV to the locV of sprite 21
  17.           set the locV of sprite 21 to oldLocV + 12
  18.         end if
  19.       end if
  20.       repeat with N = 1 to 4
  21.         set testSpriteNum to the memberNum of sprite (16 + N)
  22.         set testCast to the castLibNum of sprite (16 + N)
  23.         if the name of member testSpriteNum of castLib testCast = gCurrentInk then
  24.           HighlightInk(N)
  25.         end if
  26.       end repeat
  27.       updateStage()
  28.     end if
  29.   end if
  30. end
  31.  
  32. on scrollInkEffectsDown
  33.   global gCurrentInkPosition, gCurrentInk
  34.   doButton()
  35.   if the result = 1 then
  36.     if gCurrentInkPosition > 14 then
  37.       nothing()
  38.     else
  39.       repeat with N = 1 to 4
  40.         set the memberNum of sprite (N + 16) to the memberNum of sprite (N + 16) + 1
  41.       end repeat
  42.       set gCurrentInkPosition to gCurrentInkPosition + 1
  43.       if the visible of sprite 21 = 1 then
  44.         if the locV of sprite 21 = 57 then
  45.           set the visible of sprite 21 to 0
  46.         else
  47.           set oldLocV to the locV of sprite 21
  48.           set the locV of sprite 21 to oldLocV - 12
  49.         end if
  50.       end if
  51.       repeat with N = 1 to 4
  52.         set testSpriteNum to the memberNum of sprite (N + 16)
  53.         set testCast to the castLibNum of sprite (N + 16)
  54.         if the name of member testSpriteNum of castLib testCast = gCurrentInk then
  55.           HighlightInk(N)
  56.         end if
  57.       end repeat
  58.       updateStage()
  59.     end if
  60.   end if
  61. end
  62.